<?php 
 require_once("konf.php"); 
 if(!empty($_REQUEST["korras_id"])){
 $kask=$yhendus->prepare(
 "UPDATE mikrobussivedu SET pakkuminekinnitatud=8 WHERE id=?");
$kask->bind_param("i", $_REQUEST["korras_id"]);
$kask->execute();
 }
 if(!empty($_REQUEST["vigane_id"])){
 $kask=$yhendus->prepare(
 "UPDATE mikrobussivedu SET pakkuminekinnitatud=8 WHERE id=?");
$kask->bind_param("i", $_REQUEST["vigane_id"]);
$kask->execute();
 }
 $kask=$yhendus->prepare("SELECT id, kliendinimi FROM mikrobussivedu");

 $kask->bind_result($id, $kliendinimi);
 $kask->execute();
?>
<!doctype html>
<html>
 <head>
 <title>Pakkumiseta soovid</title>
 </head>
 <body>
 <h1>Pakkumiseta soovid</h1>
 <table>
 <?php
 while($kask->fetch()){
 echo "
 <tr>
 <td>$kliendinimi</td>
 

 <td>
 <a href='?korras_id=$id'>Tee pakkumine</a> <a href='?vigane_id=$id'>Kustuta</a>
 </td>
</tr>
 ";
}
 ?>
</table>
 </body>
</html>
